﻿@using System.Web.Optimization
@model dynamic
@{
    Layout = null;
}


<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>雪绒花_用户信息选择管理</title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta name="keywords" content="" />
    <meta name="description" content="" />

    @Styles.Render("~/Themes/default/css/cp.globle.min6.css")
    @Scripts.Render("~/Themes/default/js/cp.globle.min6.js")
    <!--去除顶层加载中 14-10-17 By 唐有炜-->
    <script type="text/javascript">
            //=============================================================
            //去除顶层加载中
            $(document).ready(function () {
                //去除加载中
                if (undefined != top.dialog.list["show_loading"]) {
                    top.dialog.list["show_loading"].close().remove();
                    //showTopMsg("页面加载成功！", "温馨提示", "Success");
                }
            });
            //=====================================================================
    </script>


    <script type="text/javascript">
    //全局变量
    var sysuser_grid;

    $(function () {

        //初始化表格
        InitSysUserGrid();
    });


    function InitSysUserGrid() {
        sysuser_grid = $("#sysuser_grid_data").bootgrid({
            ajax: true,
            post: function() {
            return {
               RoleId:5
            };
            },
            url: "/api/SysUserApi/GetBootGridSysUsers",
            selection: true,
            multiSelect: true,
            rowSelect: false,
            keepSelection: true,
            rowCount: [5, 10, 15],
            templates: {
                header: "<div id=\"{{ctx.id}}\" class=\"{{css.header}}\"><div class=\"row\"><div class=\"col-sm-12 actionBar\">" +
                    "<div class=\"search form-group\"><div class=\"input-group\"><span class=\"icon glyphicon input-group-addon glyphicon-search\"></span> <input type=\"text\" class=\"search-field form-control\" placeholder=\"输入关键字\"></div></div>" +
                    "<p class=\"{{css.actions}}\"></p></div></div></div>"
            },
            labels: {
                all: "all", //checkbox全选的值
                search: "请输入用户名称",
                loading: "加载中...",
                noResults: "对不起，暂无符合条件的记录！",
                refresh: "刷新",
                infos: ""
            },
            formatters: {
                "UserLname": function (column, row) { return row.UserLname; },
                "UserTname": function (column, row) { return row.UserTname; }
            }
        }).on("loaded.rs.jquery.bootgrid", function (e) {
            //按钮提示
            $('.tip').tooltip({ placement: "bottom" });
            //按钮气泡
            $('.pop').popover({ html: true, trigger: "hover" });
            //showMsg("数据加载完毕！", "Success");
        });
    }

    //获取要转移的用户id，提供给父页面调用
    function get_selected_user_ids() {
        var ids = get_selected_ids("sysuser_grid_data");
        //console.log(ids);
        //alert(ids);
        if (ids == "") {
            showTopMsg("请选择你转移给的用户！", "错误提示", "Error");
            return "";
        }

        if (ids.indexOf(",")>=0) {
            showTopMsg("只能转移给一个用户！", "错误提示", "Error");
            return "";
        } 
        return ids;
    }
    </script>

</head>
<body>

    <div>
        <table id="sysuser_grid_data" class="table table-condensed table-hover table-striped table-bordered" data-selection="true" data-multi-select="true">
            <thead>
                <tr>
                    <th data-column-id="UserRegDate" data-header-align="center" data-formatter="UserLname" data-order="desc">用户名</th>
                    <th data-column-id="Id" data-type="numeric" data-identifier="true"  data-header-align="center" data-formatter="UserTname" data-order="desc">真实姓名</th>
                    <th data-column-id="DepId" data-header-align="center"  data-formatter="DepId" data-order="desc">所属部门</th>
                    <th data-column-id="RoleId" data-header-align="center"  data-formatter="RoleId" data-order="desc">所属角色</th>
                </tr>
            </thead>
        </table>
    </div>

</body>
</html>


